package edu.luc.cs.backend;
import java.util.*;

public class Employee extends Person{
	private static final String EMPLOYEE_CODE = "E";
	private static int employeeNum = 0;
	private String staffId;
	private ArrayList<String> courses;
	
	public Employee(String familyName, String givenName, int yyyy, int mm,
			int dd, String sex) {
		super(familyName, givenName, yyyy, mm, dd, sex, "brown"); //eyecolor irrelevant
		setStaffId();
		courses = new ArrayList<String>();
	}

	public void setStaffId() {
		this.staffId = EMPLOYEE_CODE + employeeNum++;
	}

	public String getStaffId() {
		return staffId;
	}
	
	public String toString() {
		return "StaffID: " + this.staffId + "\n" + super.toString() + "\n" + this.printCourses();
	}
	
	public void addCourse(String courseId) {
		courses.add(courseId);
	}
	
	public String printCourses() {
		String toReturn = "Courses Teaching \n" +
						  "----------------\n";
		for (String s : courses) {
			
			toReturn += s + "\n";
		}
		return toReturn;
	}

}
